#!/usr/bin/env python
#coding=utf-8

import pickle
import getpass

def select_db():
	#return pickle.load(open('zpass.pass','rb'))
	with open('zpass.pass','rb') as f:
		return pickle.load(f)


def insert_db(obj):
	#pickle.dump(obj,open("zpass.pass",'wb'))
	with open('zpass.pass','wb') as f:
		pickle.dump(obj,f)


def get_passwd():
	return select_db()

def save_passwd():
	passwd = {'web':123456}
	insert_db(passwd)

if __name__ == '__main__':
	save_passwd()
	print(get_passwd())